package com.fzh.bookstore.biz.order.service.impl;

import com.fzh.bookstore.biz.order.dto.*;
import com.fzh.bookstore.biz.order.entity.Order;
import com.fzh.bookstore.biz.order.mapper.OrderMapper;
import com.fzh.bookstore.biz.order.service.OrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fzh.bookstore.dto.SuperResponse;
import com.fzh.bookstore.utils.IdUtils;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author fang
 * @since 2021-02-25
 */
@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements OrderService {


    @Override
    public SuperResponse payment(PaymentRequest request) {



        return null;
    }

    @Override
    public SuperResponse createOrder(OrderCreateRequest request) {
        SuperResponse response = new SuperResponse();

        Order order = new Order();
        order.setOrderNo(IdUtils.getNum14());
        order.setUserId("");
        //加入购物车

        //计算订单价格

        //生成订单
        return response;
    }


    @Override
    public SuperResponse addCart(CartAddRequest request) {
        return null;
    }


    @Override
    public SuperResponse orderList(OrderListRequest request) {
        return null;
    }

    @Override
    public SuperResponse orderInfo(OrderInfoRequest request) {
        return null;
    }

}
